package com.tianjin.design.prototype;

/**
 *
 * @author tianjin
 *
 * 2023年4月12日
 * TODO
 *
 * 定义一个形状抽象类，实现Cloneable接口，重写clone方法，
 */
public abstract class Shape implements Cloneable{

	private String id;
	protected String type;

	abstract void draw();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Override
	protected Object clone() {
		Object clone = null;
	      try {
	         clone = super.clone();
	      } catch (CloneNotSupportedException e) {
	         e.printStackTrace();
	      }
	    return clone;
	}
}
